<template>
  <div>{{ depName }}</div>
</template>

<script>
  import { getDetail } from '@/api/organization'
  export default {
    name: 'UserDep',
    props: ['id'],
    data() {
      return {
        depName: '---',
      }
    },
    created() {
      this.getDep()
    },
    methods: {
      async getDep() {
        const { data } = await getDetail({ dep_id: this.id })
        this.deplist = data
        if (data.info) {
          this.depName = data.info.dep_name
        }
      },
    },
  }
</script>
